package model;

import java.util.ArrayList;
import java.util.List;

public class ArticleImpl implements Article {

	private String name;
	private List<Discussion> discussions = new ArrayList<Discussion>();
	
	@Override
	public String getName() {
		return name;
	}

	@Override
	public void setName(String name) {
		this.name = name;
	}

	@Override
	public List<Discussion> getDiscussions() {
		return discussions;
	}

	@Override
	public void setDiscussions(List<Discussion> discussions) {
		this.discussions = discussions;
	}

	@Override
	public void addDiscussion(Discussion discussion) {
		if (discussion != null) {
			discussions.add(discussion);
		}
	}
	
}
